package cn.stylefeng.guns.modular.quan.mapper;

import cn.stylefeng.guns.modular.quan.entity.Coupon;
import cn.stylefeng.guns.modular.quan.model.params.CouponParam;
import cn.stylefeng.guns.modular.quan.model.result.CouponResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Dong
 * @since 2023-10-31
 */
public interface CouponMapper extends BaseMapper<Coupon> {

    /**
     * 获取列表
     *
     * @author Dong
     * @Date 2023-10-31
     */
    List<CouponResult> customList(@Param("paramCondition") CouponParam paramCondition);

    /**
     * 获取map列表
     *
     * @author Dong
     * @Date 2023-10-31
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") CouponParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author Dong
     * @Date 2023-10-31
     */
    Page<CouponResult> customPageList(@Param("page") Page page, @Param("paramCondition") CouponParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author Dong
     * @Date 2023-10-31
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") CouponParam paramCondition);

    List<Map<String, Object>> getCouponLists(@Param("userId") String userId);
    List<Map<String, Object>> getCouponList(@Param("userId") String userId);

    Map<String, Object> getCouponDetail(@Param("userId") String userId, @Param("couponId") Long couponId);

    int jianquan(@Param("couponId") Long couponId);
}
